import express from 'express';
import common from '../controllers/common';

const router = express.Router();

router.get('/get_public_platform',common.getPublicPlatform);

router.post('/query',common.query);
router.post('/wxjsticket', common.getSignature);
router.post('/bind_new_device', common.bindNewDevice);
router.post('/unbind',common.unBindDevice);
router.post('/get_bind_users', common.getBindUsers);
router.post('/get_bind_device',common.getBindDevice);
router.post('/get_device_sn',common.getDeviceSnByIp);
router.post('/get_sound_waves',common.getSoundWavesAudio);
router.post('/del_sound_waves',common.deleteSoundWavesAudio);

router.post('/share_qrcode',common.shareDeviceQRCode);
router.post('/remove_device_user',common.removeBindUser);
router.post('/update_device_info',common.updateBindDeviceInfo);
router.post('/get_album_group',common.getAlbumGroup);
router.post('/rank_album',common.getHomeRankAlbum);
router.post('/rank_album_page',common.getRankAlbumPage);
router.post('/primary_album_list',common.primaryAlbumList);

// 将query接口拆开
router.post('/album_list',common.getAlbumList);
router.post('/album_group_by_id',common.getAlbumGroupById);
router.post('/get_audios',common.getAudios);
router.post('/user_info',common.getUserInfo);
router.post('/album_info',common.getAlbumInfo);

// 添加单个专辑音频
router.post('/add_album',common.addAlbum);
router.post('/remove_album',common.removeAlbum);

// 添加单个音频
router.post('/add_audio',common.addAudio);
router.post('/remove_audio',common.removeAudio);

// 收藏
router.post('/add_store_audio',common.storeAudio);
router.post('/remove_store_audio',common.removeStoreAudio);

router.post('/favorite_count',common.favoriteCount);
router.post('/category_count',common.categoryCount);
router.post('/favorite_list',common.favoriteList);
router.post('/store_category_list',common.storeCategoryAudioList);
// 清空我的收藏
router.post('/remove_favorite',common.removeFavorite);
// 清空收藏类别
router.post('/remove_store_category',common.removeStoreCategory);
router.post('/find_store_list',common.findCategoryAudioList);


export default router;